package a.j;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;

final class xc
  implements qb
{
  private JComponent a;
  private AffineTransform b;
  
  public xc(pg parampg, JComponent paramJComponent, AffineTransform paramAffineTransform)
  {
    parampg.T().add(paramJComponent);
    this.a = paramJComponent;
    this.b = paramAffineTransform;
  }
  
  public void paint(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = this.a.isDoubleBuffered();
    if (bool1) {
      this.a.setDoubleBuffered(false);
    }
    if (!bool2)
    {
      if (this.a.getClientProperty("NodeCellRenderer.noImage") == null) {
        try
        {
          BufferedImage localBufferedImage = paramGraphics2D.getDeviceConfiguration().createCompatibleImage(this.a.getWidth(), this.a.getHeight(), 1);
          Graphics2D localGraphics2D1 = localBufferedImage.createGraphics();
          if (!bool2)
          {
            if (this.a.getClientProperty("NodeCellRenderer.adoptRenderingHints") != null)
            {
              localGraphics2D1.setRenderingHint(RenderingHints.KEY_ANTIALIASING, paramGraphics2D.getRenderingHint(RenderingHints.KEY_ANTIALIASING));
              localGraphics2D1.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, paramGraphics2D.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING));
            }
            this.a.paint(localGraphics2D1);
            if (!bool2) {
              localGraphics2D1.dispose();
            }
          }
          else if (this.a.getClientProperty("NodeCellRender.lowQualityImage") == null)
          {
            Graphics2D localGraphics2D2 = (Graphics2D)paramGraphics2D.create();
            localGraphics2D2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            localGraphics2D2.drawImage(localBufferedImage, this.b, null);
            localGraphics2D2.dispose();
            if (bool2) {
              break label209;
            }
            if (!ld.D) {
              break label208;
            }
          }
          paramGraphics2D.drawImage(localBufferedImage, this.b, null);
        }
        finally
        {
          label208:
          label209:
          if (bool1) {
            this.a.setDoubleBuffered(true);
          }
        }
      } else {
        paramGraphics2D = (Graphics2D)paramGraphics2D.create();
      }
    }
    else {
      try
      {
        paramGraphics2D.transform(this.b);
        this.a.paint(paramGraphics2D);
      }
      finally
      {
        paramGraphics2D.dispose();
        if (bool1) {
          this.a.setDoubleBuffered(true);
        }
      }
    }
  }
  
  public Rectangle getBounds()
  {
    double[] arrayOfDouble = new double[8];
    double tmp18_17 = (arrayOfDouble[2] = arrayOfDouble[5] = 0.0D);
    arrayOfDouble[1] = tmp18_17;
    arrayOfDouble[0] = tmp18_17;
    double tmp34_33 = this.a.getHeight();
    arrayOfDouble[7] = tmp34_33;
    arrayOfDouble[3] = tmp34_33;
    double tmp50_49 = this.a.getWidth();
    arrayOfDouble[6] = tmp50_49;
    arrayOfDouble[4] = tmp50_49;
    this.b.transform(arrayOfDouble, 0, arrayOfDouble, 0, 4);
    double d1 = Math.max(Math.max(arrayOfDouble[0], arrayOfDouble[2]), Math.max(arrayOfDouble[4], arrayOfDouble[6]));
    double d2 = Math.min(Math.min(arrayOfDouble[0], arrayOfDouble[2]), Math.min(arrayOfDouble[4], arrayOfDouble[6]));
    double d3 = Math.max(Math.max(arrayOfDouble[1], arrayOfDouble[3]), Math.max(arrayOfDouble[5], arrayOfDouble[7]));
    double d4 = Math.min(Math.min(arrayOfDouble[1], arrayOfDouble[3]), Math.min(arrayOfDouble[5], arrayOfDouble[7]));
    return new Rectangle((int)d2 - 1, (int)d4 - 1, (int)(d1 - d2) + 2, (int)(d3 - d4) + 2);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.xc

 * JD-Core Version:    0.7.0.1

 */